package br.com.kliptus.model.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.maverick.bean.EntityBean;

@Entity
@Table(name = "city")
public class CityJB extends EntityBean {

	private static final long serialVersionUID = 1L;
	
	private String name;
	private FederalUnitJB federalUnit;
	
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	public Long getId() {
		return id;
	}

	@Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne
	@JoinColumn(name = "federal_unit_id", referencedColumnName = "id")
	public FederalUnitJB getFederalUnit() {
		return federalUnit;
	}

	public void setFederalUnit(FederalUnitJB federalUnit) {
		this.federalUnit = federalUnit;
	}

}